﻿using System;
using System.Text;
using BSDS.Core.Data.Local;
using BSDS.Core.Model.Services.Geocoding;
using BSDS.Core.Model.Services.Jobs.Core;

namespace BSDS.Core.Model.Services.Jobs
{
    public class GeocodeJob : Job
    {
        public static string TypeName = "Geocode";

        public override string JobTypeName { get { return TypeName; } }
        public string Description { get; set; }
        public string Link { get; set; }
        public string OriginalFilename { get; set; }
        public DataFormat OriginalFormat { get; set; }
        public GeocodingMode Mode { get; set; }

        public override string ToString()
        {
            var baseInfo = base.ToString();

            var builder = new StringBuilder();
            builder.Append("Geocode Mode: ").Append(Mode).Append(Environment.NewLine)
                   .Append("Geocode Records: ").Append(RecordsNumber).Append(Environment.NewLine)
                   .Append("Command: ").Append(Command);

            return baseInfo + builder;
        }
    }
}